package cos.android.tim.objects;

import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import cos.android.tim.element.Element;

public class Chain extends Element {

	Element element1;
	Element element2;
	Paint paint;

	public Chain(Bitmap sprite, Bitmap colisionSprite, Bitmap miniSprite,
			int xPos, int yPos, String kind) {
		super(sprite, colisionSprite, miniSprite, xPos, yPos, kind);
		paint = new Paint();
		paint.setColor(Color.BLACK);
	}

	/*
	 * @Override public void draw(Canvas canvas) {
	 * 
	 * if (element1 != null && element2 != null) {
	 * canvas.drawLine(element1.getxPos(), element1.getyPos(),
	 * element2.getxPos(), element2.getyPos(), paint); } }
	 */

	public void drawTemp(Canvas canvas, float x, float y) {
		canvas.drawLine(((Element) element1).getxPos(),
				((Element) element1).getyPos(), x, y, paint);
	}

	public Element getElement2() {
		return element2;
	}

	public void setElement2(Element element2) {
		this.element2 = element2;
	}

	public Element getElement1() {
		return element1;
	}

	public void setElement1(Element element1) {
		this.element1 = element1;
	}

}
